<?php (!defined('IN_SYSTEM') || !defined('ADMIN_PRE')) && exit('Access Denied!');?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>{php echo $_G['settings']['sitenames'],'-',Lang::get('admin_center','admin')}</title>
<link rel="stylesheet" href="admin/template/css/style.css" type="text/css" media="all" />
<script type="text/javascript" src="admin/script/jquery.js"></script>
<script type="text/javascript">
var COOKIE_PRE='{COOKIE_PRE}';
var COOKIE_DOMAIN='{COOKIE_DOMAIN}';
var COOKIE_PATH='{COOKIE_PATH}';
</script>
<script type="text/javascript" src="admin/script/common.js"></script>
</head>
<body style="height: 100%;overflow:hidden;">
<table cellspacing="0"  border="0"  cellpadding="0" width="100%" height="100%" >
<tbody><tr><td height="34"  colspan="2">
<div id="header">
  {if $_G['uid']>0}
  <div id="menu">
    <ul class="left" style="display: block;">
      <li id="dashboard"><a href="{url('admin.php')}" class="top">首页</a></li>
      {if  ican('userindex') || ican('usergroupindex')}
      <li id="catalog"><a  class="top">用户管理</a>
      <ul>
      {if ican('userindex')}
      <li><a href="{url('admin.php?m=user')}">用户列表</a></li>
      {/if}
      {if ican('useradd')}
      <li><a href="{url('admin.php?m=user&f=add')}">添加用户</a></li>
      {/if}
      {if ican('usergroupindex')}
      <li><a href="{url('admin.php?m=usergroup')}">用户分组</a></li>
      {/if}
      {if ican('usergroupadd')}
      <li><a href="{url('admin.php?m=usergroup&f=add')}">添加用户组</a></li>
      {/if}
      </ul>
      </li>
	{/if}
      <li id="extension"><a class="top">内容管理</a>
        <ul>
		{if ican('artindex')}
              <li><a href="{url('admin.php?m=article&f=index')}">文章管理</a></li>
        {/if}   
        {if ican('artwrite')}   
              <li><a href="{url('admin.php?m=article&f=write')}">撰写文章</a></li>
        {/if}        
         {if ican('catindex')}
          <li><a href="{url('admin.php?m=category')}">分类管理</a></li>
         {/if}
        {if ican('comment')}
          <li><a href="{url('admin.php?m=comment')}">评论管理</a></li>
        {/if}  
        {if ican('tag')}
          <li><a href="{url('admin.php?m=tag')}">标签管理</a></li>
        {/if}
        {if ican('page')} 
          <li><a href="{url('admin.php?m=page')}">页面管理</a></li>	 
        {/if}
        {if ican('block')} 
          <li><a href="{url('admin.php?m=block')}">区块管理</a></li>
        {/if}
        {if ican('adv')} 
          <li><a href="{url('admin.php?m=adv')}">广告管理</a></li>
        {/if}
        </ul>
      </li>
      {if ican('ecsetting') || ican('ecolist') || ican('shopindex') || ican('ecpayment')}
      <li id="sale"><a class="top">电子商务</a>
        <ul>
        {if ican('ecsetting')}
        <li><a href="{url('admin.php?m=ecommerce')}">基本设置</a>
        {/if}
        	{if ican('ecproduct')}
          <li><a href="{url('admin.php?m=product')}">商品管理</a></li>
          {/if}
          {if ican('ecolist')}
          <li><a href="{url('admin.php?m=order')}">订单管理</a></li>
          {/if}
          {if ican('shopindex')}
          <li><a href="{url('admin.php?m=shop')}">商家管理</a>
          {/if}
          {if ican('ecpayment')}
          <li><a href="{url('admin.php?m=ecommerce&f=payment')}">支付方式</a>
          {/if}
        </ul>
      </li>
      {/if}
      {if ican('potindex')}
      <li id="point"><a class="top">积分管理</a>
        <ul>
          <li><a href="{url('admin.php?m=point')}">基本设置</a></li>
          <li><a href="{url('admin.php?m=point&f=setting')}">积分策略</a></li>
          <li><a href="{url('admin.php?m=point&f=log')}">积分记录</a></li>
        </ul>
      </li>
        {/if}
      {if ican('navindex')}
      <li id="nav"><a class="top">导航管理</a>
        <ul>
          <li><a href="{url('admin.php?m=nav')}">导航列表</a></li>
          <li><a href="{url('admin.php?m=nav&navtype=0')}">主导航</a></li>
          <li><a href="{url('admin.php?m=nav&navtype=1')}">顶部导航</a></li>
          <li><a href="{url('admin.php?m=nav&navtype=2')}">底部导航</a></li>
          <li><a href="{url('admin.php?m=nav&navtype=3')}">友情链接1</a></li>
          <li><a href="{url('admin.php?m=nav&navtype=4')}">友情链接2</a></li>
          <li><a href="{url('admin.php?m=nav&navtype=5')}">友情链接3</a></li>
        </ul>
      </li>
        {/if}
       {if ican('sysconfig') || ican('systheme') || ican('sysdata') || ican('syscreatehtml') || ican('sysplugin') ||  ican('sysattachment')} 
      <li id="system"><a class="top">系统管理</a>
        <ul>
        {if ican('sysconfig')}
          <li><a href="{url('admin.php?m=config')}">网站设置</a></li>
        {/if}
        {if ican('systheme')}  
          <li><a href="{url('admin.php?m=theme')}">主题管理</a></li>
         {/if}
        {if ican('sysdata')}
          <li><a href="{url('admin.php?m=data')}">数据维护</a></li>
         {/if}
        {if ican('syscreatehtml')}
          <li><a href="{url('admin.php?m=createhtml')}">静态生成</a></li>
        {/if}
        {if ican('sysplugin') && false}
          <li><a href="{url('admin.php?m=plugin')}">插件管理</a></li>
         {/if}
        {if ican('sysattachment')}
          <li><a href="{url('admin.php?m=attachment')}">附件管理</a></li>
          {/if}
          {if ican('region')} 
          <li><a href="{url('admin.php?m=region')}">地区设置</a></li>	 
          {/if} 
        </ul>
      </li>
      {/if}
    </ul>
    <ul class="right">
     <li><a class="top" href="{url admin.php?m=user&f=edit&id=$_G[uid]}">{Lang::get('Welcome back')},&nbsp;{$_G['username']}</a></li>
      <li><a href="{BASE_URL}" target="_blank" class="top">{Lang::get('Store Front')}</a></li>
      <li><a class="top" href="{url user.php?f=logout}">{Lang::get('logout')}</a></li>
      </ul>
    <script type="text/javascript"><!--
$(document).ready(function() {
	$('#menu > ul').superfish({
		hoverClass	 : 'sfHover',
		pathClass	 : 'overideThisToUse',
		delay		 : 0,
		animation	 : {height: 'show'},
		speed		 : 'normal',
		autoArrows   : false,
		dropShadows  : false, 
		disableHI	 : false, /* set to true to disable hoverIntent detection */
		onInit		 : function(){},
		onBeforeShow : function(){},
		onShow		 : function(){},
		onHide		 : function(){}
	});
	$(".main").height($(window).height()-90);
	$('#menu > ul').css('display', 'block');
});
 
function getURLVar(urlVarName) {
	var urlHalves = String(document.location).toLowerCase().split('?');
	var urlVarValue = '';
	if (urlHalves[1]) {
		var urlVars = urlHalves[1].split('&');
		for (var i = 0; i <= (urlVars.length); i++) {
			if (urlVars[i]) {
				var urlVarPair = urlVars[i].split('=');
				if (urlVarPair[0] && urlVarPair[0] == urlVarName.toLowerCase()) {
					urlVarValue = urlVarPair[1];
				}
			}
		}
	}
	return urlVarValue;
} 

$(document).ready(function() {
	route = getURLVar('m');
	if (!route) {
		$('#dashboard').addClass('selected');
	} else {
		part = route.split('/');
		url = part[0];
		if (part[1]) {
			url += '/' + part[1];
		}
		$('a[href*=\'' + url + '\']').parents('li[id]').addClass('selected');
		$('#lefter').html('<ul>'+$('a[href*=\'' + url + '\']').parents('ul').html()+'</ul>');
		$('#lefter li').find('a[href*=\'' + url + '\']').parent().eq(0).addClass('selected');
	}
});
function leftside(obj){
	$('#lefter').html('<ul>'+$(obj).html()+'</ul>');
}
//--></script> 
  </div>
 {/if}
</div>
</td></tr>
<tr>
<td width="140" valign="top"  style="background:#F2F9FD;border-right:1px solid #ECECEC;">
<div id="lefter">
	<ul>
	{if ican('artindex')}
      <li><a href="{url('admin.php?m=article')}">所有文章</a></li>
      {/if}
	{if ican('artwrite')}
      <li><a href="{url('admin.php?m=article&f=write')}">撰写文章</a></li>
      {/if}
      {if ican('comcheck')}
      <li><a href="{url('admin.php?m=comment&mod=desc&check=no')}">末审核评论</a></li>
      {/if}
      {if ican('ecolist')}
      <li><a href="{url('admin.php?m=order')}">订单管理</a></li>
      {/if}
      </ul>
</div>
</td><td  valign="top" width="100%" height="100%" scrolling="yes">
<div id="mainer">